package com.tsll.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName staffsal
 */
public class Staffsal implements Serializable {
    /**
     * 工资id
     */
    private Integer salId;

    /**
     * 基本工资
     */
    private Double staffSal;

    /**
     * 提成
     */
    private Double staffComm;

    /**
     * 奖金
     */
    private Double staffBonus;

    /**
     * 发放时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date sendDate;

    /**
     * 扣的工资
     */
    private Double staffDeductmoney;

    /**
     * 员工id
     */
    private Integer staffid;

    /**
     * 总工资
     */
    private Double count;

    private static final long serialVersionUID = 1L;

    /**
     * 工资id
     */
    public Integer getSalId() {
        return salId;
    }

    /**
     * 工资id
     */
    public void setSalId(Integer salId) {
        this.salId = salId;
    }

    /**
     * 基本工资
     */
    public Double getStaffSal() {
        return staffSal;
    }

    /**
     * 基本工资
     */
    public void setStaffSal(Double staffSal) {
        this.staffSal = staffSal;
    }

    /**
     * 提成
     */
    public Double getStaffComm() {
        return staffComm;
    }

    /**
     * 提成
     */
    public void setStaffComm(Double staffComm) {
        this.staffComm = staffComm;
    }

    /**
     * 奖金
     */
    public Double getStaffBonus() {
        return staffBonus;
    }

    /**
     * 奖金
     */
    public void setStaffBonus(Double staffBonus) {
        this.staffBonus = staffBonus;
    }

    /**
     * 发放时间
     */

    public Date getSendDate() {
        return sendDate;
    }

    /**
     * 发放时间
     */
    public void setSendDate(Date sendDate) {
        this.sendDate = sendDate;
    }

    /**
     * 扣的工资
     */
    public Double getStaffDeductmoney() {
        return staffDeductmoney;
    }

    /**
     * 扣的工资
     */
    public void setStaffDeductmoney(Double staffDeductmoney) {
        this.staffDeductmoney = staffDeductmoney;
    }

    /**
     * 员工id
     */
    public Integer getStaffid() {
        return staffid;
    }

    /**
     * 员工id
     */
    public void setStaffid(Integer staffid) {
        this.staffid = staffid;
    }

    /**
     * 总工资
     */
    public Double getCount() {
        return count;
    }

    /**
     * 总工资
     */
    public void setCount(Double count) {
        this.count = count;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Staffsal other = (Staffsal) that;
        return (this.getSalId() == null ? other.getSalId() == null : this.getSalId().equals(other.getSalId()))
            && (this.getStaffSal() == null ? other.getStaffSal() == null : this.getStaffSal().equals(other.getStaffSal()))
            && (this.getStaffComm() == null ? other.getStaffComm() == null : this.getStaffComm().equals(other.getStaffComm()))
            && (this.getStaffBonus() == null ? other.getStaffBonus() == null : this.getStaffBonus().equals(other.getStaffBonus()))
            && (this.getSendDate() == null ? other.getSendDate() == null : this.getSendDate().equals(other.getSendDate()))
            && (this.getStaffDeductmoney() == null ? other.getStaffDeductmoney() == null : this.getStaffDeductmoney().equals(other.getStaffDeductmoney()))
            && (this.getStaffid() == null ? other.getStaffid() == null : this.getStaffid().equals(other.getStaffid()))
            && (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSalId() == null) ? 0 : getSalId().hashCode());
        result = prime * result + ((getStaffSal() == null) ? 0 : getStaffSal().hashCode());
        result = prime * result + ((getStaffComm() == null) ? 0 : getStaffComm().hashCode());
        result = prime * result + ((getStaffBonus() == null) ? 0 : getStaffBonus().hashCode());
        result = prime * result + ((getSendDate() == null) ? 0 : getSendDate().hashCode());
        result = prime * result + ((getStaffDeductmoney() == null) ? 0 : getStaffDeductmoney().hashCode());
        result = prime * result + ((getStaffid() == null) ? 0 : getStaffid().hashCode());
        result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", salId=").append(salId);
        sb.append(", staffSal=").append(staffSal);
        sb.append(", staffComm=").append(staffComm);
        sb.append(", staffBonus=").append(staffBonus);
        sb.append(", sendDate=").append(sendDate);
        sb.append(", staffDeductmoney=").append(staffDeductmoney);
        sb.append(", staffid=").append(staffid);
        sb.append(", count=").append(count);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}